package com.web.server.common.utils;


import org.slf4j.Logger;

/**
 * 打日志辅助工具
 * Created by Rizon on 16/8/29.
 */
public class LoggerUtil {
    private static String Debug(Logger logger, String msg, String head, String tail, String attaches) {
        String msg0 = (head != null ? (head + "-") : "")
                + msg
                + (tail != null ? (head + "-") : "");
        logger.debug(msg0 + (attaches != null ? ("-attaches:" + attaches) : ""));
        return msg0;
    }

    public static String DebugActContract(Logger logger, String msg, String attaches) {
        return Debug(logger, msg, "合同审批", null, attaches);
    }
    public static String DebugActContract(Logger logger, String msg) {
        return Debug(logger, msg, "合同审批", null, null);
    }
}
